package DuiXiang.src.ch10;

public class TVRemote implements RemoteControl {
    //遥控器类有重量，无线范围，颜色等属性
//有控制电视开机、关机、换台等功能
//使用oop的方式分析并实现这个过程
//遥控器
    private String brand, color;//品牌，颜色
    private double weight, wirelessRange;//重量，无线范围；

    public TVRemote() {
    }

    public TVRemote(String brand, String color, double weight, double wirelessRange) {
        this.brand = brand;
        this.color = color;
        this.weight = weight;
        this.wirelessRange = wirelessRange;
    }

    @Override
    public String toString() {
        return "这个遥控器的品牌：" + brand +
                "，颜色是：" + color +
                "色，重量是" + weight +
                "克,无线电范围是：" + wirelessRange +
                "米。";
    }

    @Override
    public void turnOn() {
        System.out.println("这个" + this.brand + "遥控器控制电视机开机。。。");
    }

    @Override
    public void turnOff() {
        System.out.println("这个" + this.brand + "遥控器控制电视机关机。。。");
    }

    @Override
    public void changeChannel() {
        System.out.println("电视屏幕亮了以后，这个" + this.brand +
                "遥控器可以控制电视机调频。。。");
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }

    public double getWirelessRange() {
        return wirelessRange;
    }

    public void setWirelessRange(double wirelessRange) {
        this.wirelessRange = wirelessRange;
    }
}
